package com.shanjupay.transaction.api;

import com.shanjupay.common.domain.BusinessException;
import com.shanjupay.transaction.api.dto.PayChannelDTO;
import com.shanjupay.transaction.api.dto.PlatformChannelDTO;

import java.util.List;

/**
 * 支付渠道服务 管理平台支付渠道，原始支付渠道，以及相关配置
 */
public interface PayChannelService {
    //查询平台服务类型
    List<PlatformChannelDTO> queryPlatformChannel() throws BusinessException;
    //为某个应用绑定服务类型
    void bindPlatformChannelForApp(String appId, String platformChannelCodes) throws BusinessException;
    /**
          * 应用是否已经绑定了某个服务类型
          * @param appId
          * @param platformChannel
          * @return 已绑定返回1，否则 返回0
          */
    int queryAppBindPlatformChannel(String appId,String platformChannel) throws BusinessException;
    /**
          * 根据平台服务类型获取支付渠道列表
          * @param platformChannelCode
          * @return
          */
    List<PayChannelDTO> queryPayChannelByPlatformChannel(String platformChannelCode) throws BusinessException;
}
